package Modele;

import java.awt.Image;

public class Texture {

	private int num;
	private Image image;
	private static Texture[] textures = new Texture[6];
	private static int nbTextures = 0;
	
	public Texture(int n, Image img) {
		this.num = n;
		this.image = img;
		Texture.textures[Texture.nbTextures] = this;
		Texture.nbTextures ++;
	}
	
	public static Image getImage(int num) {
		int i;
		for (i = 0 ; i < Texture.textures.length ; i ++) {
			if (Texture.textures[i].num == num)
				break;
		}
		return Texture.textures[i].image;
	}
	
}
